package com.goldman.aplt.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.goldman.aplt.entity.AppErrorMapping;
import com.goldman.aplt.entity.parameter.AppSystemParameter;
import com.goldman.aplt.repo.AppErrorMappingMapper;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@CacheConfig(cacheNames = "${systemId}:AppErrorMappingService")
@Service
public class AppErrorMappingService extends ServiceImpl<AppErrorMappingMapper, AppErrorMapping> {
    @Cacheable
    public AppErrorMapping selOne(String code, String language) {
        return lambdaQuery().eq(AppErrorMapping::getCode, code)
                .eq(AppErrorMapping::getLanguage, language).one();
    }
}
